<?php
$this->houseme_view->header();
?>
<!--好巧俬介紹頁-->
    <div id="ideaPage">
        <?php
            $previous = $previous_next_post['previous'];
            $next = $previous_next_post['next'];
        ?>

        <?php if(!empty($previous)){ ?>
            <div class="prevPP"><a href="/user_share/detail/<?php echo $previous[0]['id']?>/<?php echo isset($keyword)?'?q='.urlencode($keyword):(isset($category_id)?'?c='.$category_id:'') ?>">< 上一篇</a></div>
        <?php } ?>

        <?php if(!empty($next)){ ?>
            <div class="nextPP"><a href="/user_share/detail/<?php echo $next[0]['id']?>/<?php echo isset($keyword)?'?q='.urlencode($keyword):(isset($category_id)?'?c='.$category_id:'') ?>">下一篇 ></a></div>
        <?php } ?>
        
        

        <div style="clear:both"></div>
        <div class="cycle-slideshow" 
        data-cycle-swipe=true
        data-cycle-swipe-fx=scrollHorz
        data-cycle-fx=fade
        data-cycle-speed=600
        data-cycle-timeout=0
        data-cycle-pager=".pageBtn_NowImg > ul"
        data-cycle-pager-template=""
        data-cycle-prev=".showImgPrev"
        data-cycle-next=".showImgNext"
        data-cycle-slides=">div"
        >
        <!-- empty element for pager links -->
        
        <?php 
        //echo "<pre>";print_r($post[0]);echo "</pre>";
        //<img src="assets/img/ideapage/demoimg_600x400.png" />
        $images = json_decode($post[0]['upload_image']);
        foreach ($images as $key => $value) {
        ?>
            <div><center><img width="auto" height="400" src="<?php echo $this->config->item('image_uploader_fe_original','layout').'/'.$post[0]['user_id'].'/'.$value?>"></center></div>
        <?php
        }
        ?>
        <span class="showImgPrev"><a href="javascript:void(0);">#</a></span>
        <span class="showImgNext"><a href="javascript:void(0);">#</a></span>
        </div>

        <div id="ideaPageInfo">
            <!--<div class="pageBtn_memberLike memberLikeOver">123,456,789</div>-->
            <div class="pageBtn_collect"><span>/share/detail/<?php echo $post[0]['id'].'/'; ?></span></div>
            <a href="http://www.facebook.com/sharer.php?u=<?php echo urlencode(current_url());?>"><div class="pageBtn_sharefb"></div></a>

            <div class="pageBtn_NowImg">
                <ul>
                    <?php foreach ($images as $key => $value) {?>
                    <li><a href="#"></a></li>
                    <?php } ?>
                </ul>
            </div>
            <div style="clear:both"></div>
            <span class="PageText">
                <?php 
                echo $post[0]['post_desc']; ?>
            </span>
            <span>
                <p class="link_to_user_share_page">shared by <a target="_blank" href="/share/<?php echo $post[0]['user_id'];?>"><?php echo $post[0]['name']; ?></a></p>
            </span>
            <span>
                <p class="user_question">對於文章內容有疑問嗎？<a href="javascript:;" onclick="location.href='mailto:infor.houseme@gmail.com?subject=我要檢舉不當內容&body='+ report_valid_post_email_content()" >請告知我們</a></p>
            </span>
        </div>
        <?php if(!empty($related_post)){ ?>
        <div class="ideaOtherTitle_01">其它人也看了</div>
        <ul>
            <?php foreach($related_post as $post_key => $post){ ?>
                    <?php 
                        $temp = json_decode($post['upload_image']);
                        $image_filename = $temp[0];
                    ?>
                <li class="recommendPost"><a href="/user_share/detail/<?php echo $post['id'].'/'; ?>">
                <img class="recommendPost_img" src="<?php echo $this->config->item('image_uploader_fe_thumbs','layout').'/'.$post['user_id'].'/'.$image_filename; ?>" width="136" height="102" />
                <div class="recommendPostInfo">        
                    <?php echo $post['post_excerpt']; ?>
                </div></a></li>
            <?php } ?>
        </ul>
        <?php } ?>
        <div class="endSpan"></div>
        <div class="google_ads">
            <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
            <!-- 文章內頁_1 -->
            <ins class="adsbygoogle"
                 style="display:inline-block;width:320px;height:50px"
                 data-ad-client="ca-pub-2705523748622919"
                 data-ad-slot="1033970388"></ins>
            <script>
            (adsbygoogle = window.adsbygoogle || []).push({});
            </script>
        </div>
        <div class="fb-comments" data-href="<?php echo current_url();?>" data-width="600" data-numposts="5" data-colorscheme="light"></div>
        <div class="fb-like-box" data-href="https://www.facebook.com/pages/%E6%97%A9%E7%9F%A5%E9%81%93%E5%B0%B1%E6%8A%8A%E6%88%91%E5%AE%B6%E6%90%9E%E6%88%90%E9%80%99%E6%A8%A3/191132744393087?ref_type=bookmark" data-width="600" data-height="230" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
    </div>
    <div class="list visible-xs visible-sm">
        <dl>
            <dt>
                <a href="http://houseme.meepshop.com/product/53a27b370dcd649a5c00001c/">
                    <img src="<?php echo $this->config->item('image_uploader_thumbs','layout').'/11/1400079288.jpg'; ?>" width="200" height="150" />
                    <!--<img src="/assets/img/ex_200x150.png"/>-->
                    <span>        
                        Qubefun樂高電源開關蓋板購買專區</span>
                    </a>
                            <!--
                            <ul class="sharebox">
                                <li>
                                    <img src="images/fb.jpg" alt="">
                                </li>
                                <li>
                                    <img src="images/star.jpg" alt="">
                                </li>
                                <li>
                                    <img src="images/love.jpg" alt="">
                                </li>
                            </ul>
                        -->
                    </dt>
                </dl>
    </div>
            </div>
    <!--哪裡買-->
    <div id="whereBuy" class="hidden-xs hidden-sm">
        <h3>哪裡買</h3>
        <ul>
            <li><a href="http://houseme.meepshop.com/product/53a27b370dcd649a5c00001c/">
            <img src="<?php echo $this->config->item('image_uploader_thumbs','layout').'/11/1400079288.jpg'; ?>" width="200" height="150" />
            <div class="photoListInfo_01">        
            Qubefun樂高電源開關蓋板購買專區</div></a></li>
        </ul>
        <div class="endSpan"></div>
    </div>
<?php
$this->houseme_view->footer();
?>